<template>
  <div>
    <h1>子组件：自定义事件子组件</h1>
    <h4>我的玩具: {{ myToy }}</h4>
    <button @click="emitter('send-toy', myToy)">点我将我的玩具给父组件</button>
  </div>
</template>
<script lang="ts" setup>
const myToy = "小飞机"

const emitter = defineEmits(
  ["send-toy"]
)


</script>
<style lang="scss" scoped></style>
